from django.utils.translation import ugettext as _
from django.contrib.auth.models import User, Group
from django.contrib.auth.admin import UserAdmin, GroupAdmin
from django.contrib.sites.models import Site
from django.contrib.sites.admin import SiteAdmin
from sorl import curator as admin

class UserAdmin(admin.ModelAdmin, UserAdmin):
    pass

class GroupAdmin(admin.ModelAdmin, GroupAdmin):
    pass

class SiteAdmin(admin.ModelAdmin, SiteAdmin):
    description = _("Administer all the different sites here.")

admin.site.layout = (
    (_("don't touch this stuff"), {
        'models': ('',
            'django.contrib.sites.models.Site',
        )
    }),
    (_('users & groups'), {
        'models': ('django.contrib.auth.models',
            'User', 'Group'
        )
    }),
    (_('pages & news'), {
        'models': ('',
            'example_project.pages.models.Page',
            'example_project.news.models.News',
        )
    }),
)

admin.site.register(User, UserAdmin)
admin.site.register(Group, GroupAdmin)
admin.site.register(Site, SiteAdmin)
